package com.ptszyxx.popose.module.main.home;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.ViewGroup;

import androidx.annotation.Nullable;
import androidx.lifecycle.ViewModelProviders;

import com.ptszyxx.popose.BR;
import com.ptszyxx.popose.R;
import com.ptszyxx.popose.common.enums.HomeTabEnum;
import com.ptszyxx.popose.databinding.FragmentHomeTabOtherBinding;
import com.ptszyxx.popose.module.main.home.vm.HomeTabOtherVM;
import com.ysg.base.BaseFragment;
import com.ysg.http.data.AppViewModelFactory;

public class HomeTabOtherFragment extends BaseFragment<FragmentHomeTabOtherBinding, HomeTabOtherVM> {
    public HomeTabEnum tabEnum;

    public HomeTabOtherFragment(HomeTabEnum tabEnum){
        this.tabEnum = tabEnum;
    }

    @Override
    public int initContentView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        return R.layout.fragment_home_tab_other;
    }

    @Override
    public int initVariableId() {
        return BR.viewModel;
    }

    @Override
    public HomeTabOtherVM initViewModel() {
        AppViewModelFactory factory = AppViewModelFactory.getInstance(getActivity().getApplication());
        return ViewModelProviders.of(this, factory).get(HomeTabOtherVM.class);
    }

    @Override
    public void initView() {
        super.initView();
    }

    @Override
    public void initData() {
        super.initData();
        viewModel.tabEnum = tabEnum;
    }

    @Override
    public void initViewObservable() {
    }


}
